jQuery(document).on("pageinit", "[data-role='page']", function(){
    var page = jQuery(this);
    var footer = page.find("[data-role='footer']");
    
    footer.find("a.footer-item-login").click(function() {
         $.ajax({
            type: "POST",
            url: URL_ACTION_CHECK,
            data: {},

            success: function(msg) {
                $.mobile.changePage(URL_VIEW_SERVICES, { transition: "slide", reverse: false, changeHash: true });
            },

            error: function(req, status, error) {
                $.mobile.changePage(URL_VIEW_LOGIN, { transition: "slide", reverse: false, changeHash: true });
            }
        });
    });
});

